<script type="text/javascript">
  function create() {
    var elem = document.createElement("div");
    elem.id = "t";
    elem.innerText = "selenium";
    setTimeout(() => {
      document.body.appendChild(elem);
    }, 200);
  }
</script>
<button id="b" onclick="create()">create element with delay</button>
